﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PostFramePresenter.ascx.cs" Inherits="Forums_Presenters_PostFramePresenter" %>

<table border="1" cellpadding="0" cellspacing="0" class="postFrame" id='PostView_<%#Container.EvalView( "PostId", "{0:N}" ) %>'>
  <tr>
    <td style="width: 180px; vertical-align: top" rowspan="3" class="memberBar">
      <div class="memberInformation" id="MemberView_<%#Container.EvalView( "PostId", "{0:N}" ) %>">
        <ivy:DataBindHolder runat="server" ID="MemberInformation" DataSource='<%#GetMember() %>'>

          <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; text-align: center;">
            <tr>
              <td style="padding: 20px 0px 5px 0px;"><asp:Image ImageUrl="~/images/Avatar.png" runat="server" /> </td>
            </tr>
            <tr>
              <td style="font-weight: bold; font-family: Arial; padding: 3px;"><%#Eval( "Username" ) %> </td>
            </tr>
            <tr>
              <td style="font-size: 12px;">
                <ul style="list-style-type: none; list-style-position: outside; text-align: left;">
                  <li>积分：<%#Eval( "Score" ) %></li>
                  <li>发帖数：<%#Eval( "Documents" ) %></li>
                  <li>主题数：<%#Eval( "Topics" ) %></li>
                </ul>
              </td>
            </tr>
          </table>

        </ivy:DataBindHolder>
      </div>
      <div class="historicalList" id="HistoricalView_<%#Container.EvalView( "PostId", "{0:N}" ) %>">

        <table border="0" cellpadding="0" cellspacing="0" width="100%;">
          <tr>
            <td class="title">历史版本视图</td>
            <td style="text-align: right; padding: 3px 10px; vertical-align: bottom"><a style="color: #000000;" href="javascript:ExitHistoricalView( '<%#Container.EvalView( "PostId", "{0:N}" ) %>', <%#Container.EvalView( "CurrentVersion.DocumentId", "{0:N}" ) %> );">退出</a></td>
          </tr>
        </table>

        <asp:Repeater runat="server" DataSource='<%#Container.EvalView("AllVersions") %>'>
          <ItemTemplate>
            <div class="versionIndexItem" id='VersionIndexItem_<%#Container.EvalView("DocumentId") %>' onclick="ShowHistoricalVersion( '<%#this.EvalView( "PostId", "{0:N}" ) %>', <%#Container.EvalView("DocumentId") %> );"><%#Container.EvalView( "PublishDate", "{0:yyyy-MM-dd HH:mm}" )%><br />
              by <%#Container.EvalView( "Author" )%></div>
          </ItemTemplate>
        </asp:Repeater>
      </div>
    </td>
    <td style="vertical-align: top;" class="documentView" id="DocumentView_<%#Container.EvalView("PostId", "{0:N}" ) %>">
      <asp:Repeater runat="server" ID="VersionList" OnItemDataBound="VersionItemDataBound" DataSource='<%#Container.EvalView("AllVersions") %>'>
        <ItemTemplate>

          <table border="0" cellpadding="0" cellspacing="0" class="versionView" style="width: 100%; display: none;" id="VersionView_<%#Eval( "DocumentId" ) %>">
            <tr>
              <td class="title" id="Title" runat="server">
                <asp:PlaceHolder runat="server" ID="DocumentTitle" />
              </td>
            </tr>
            <tr>
              <td style="padding: 10px;">
                <asp:PlaceHolder runat="server" ID="DocumentContent" />
              </td>
            </tr>
          </table>

        </ItemTemplate>
      </asp:Repeater>

      <script type="text/javascript" language="javascript">
        document.getElementById('VersionView_<%#Container.EvalView( "CurrentVersion.DocumentId" ) %>').style.display = "block";
      </script>

    </td>
  </tr>
  <tr>
    <td style="vertical-align: bottom">

      <table border="0" cellpadding="0" cellspacing="0" style="width: 100%; height: 25px; background-color: #DDDDEE;">
        <tr>
          <td class="action" id="Actions" runat="server"></td>
          <td style="text-align: right;"><span class="action" id="UserActions" style="width: 120px;" runat="server"></span><span class="publishInfo" id="PublishInfo" runat="server"></span></td>
        </tr>
      </table>

    </td>
  </tr>
</table>

<div style="font-size: 5px;">&nbsp;</div>

<script>
  function refreshPostExt()
  { 
  
  }
</script>
